Method and device for processing packet by using unified SR label stack

ABSTRACT

A method and a device for processing a packet by using a unified SR label stack, relating to the field of PTN. The method includes: allocating, according to a type of a forwarding plane, a compatibility indicator indicating that a unified U-SRH is carried, for a service packet entering the forwarding plane; adding an SR label stack, the U-SRH and the compatibility indicator to the service packet to obtain an extended packet; and processing and forwarding the extended packet in the forwarding plane according to the SR label stack, the U-SRH and the compatibility indicator. According to embodiments of the present disclosure, the unified SR label stack is used to simplify an application of SR technology in different forwarding planes, and uniformity of SR encapsulation format is enhanced.

TECHNICAL FIELD

The present disclosure relates to the field of Packet Transport Network(PTN), and in particular, to a method and a device for processing apacket by using a unified Segment Routing (SR) label stack.

BACKGROUND

SR is a method for routing based on a source address, and by carrying aSegment Routing Header (SRH) in a packet header of existingMulti-Protocol Label Switching (MPLS) network or Internet Protocolversion 6 (IPv6), a series of indication operations (also called segmentoperations) are carried in the SRH for routing and transmitting data ina network. Through segment routing, load balance and flow engineering ofthe network can be conveniently realized, complex network functions suchas quick rerouting and the like can be realized, and the indication ofthe segment operations can also be extended to realize a routingindication based on service or topology.

FIG. 1 shows a schematic diagram illustrating a technical principle ofsegment routing, as shown in FIG. 1, I indicates an ingress noderesponsible for encapsulating a segment routing format of a packet P, Eindicates an egress node responsible for decapsulating a segment routingpacket, and A, B, C, D and F indicate intermediate forwarding nodesresponsible for data forwarding of the segment routing packet. Theshortest path from node I to node E in FIG. 1 is I-A-B-C-E, while a userrequires that the packet would pass through node B but not through linksbetween A and B and between C and E when it is forwarded. Under suchcircumstance, conventional calculation methods based on the shortestpath cannot meet user's requirement, and thus a segment routingtechnology is proposed in the art. Indications of a path to be passed isencapsulated in the SR header at the ingress node I, an intermediaterouter forwards data according to the indications, and identifiers ofthe indications are advertised through Interior Gateway Protocol (IGP).There is no need of a traditional way using a signaling protocol foradvertising, and an intermediate node does not need to maintainforwarding information of flow engineering, resulting in a simplifiednetwork deployment.

In current SR technology, there are different routing instruction LabelStacks for different forwarding planes, that is, the SR adopts a labelstack (I-D.ietf-spring-segment-routing-mpls) compatibility with an MPLSlabel format for an MPLS forwarding plane, adopts a label stack(I-D.ietf-6man-segment-routing-header) compatibility with an IPv6address format through a Segment Routing Extension Header (SRH) for anIPv6 forwarding plane, and adapt corresponding label stack formats forother forwarding planes. Such design introduces following problems forprocessing of SR label stack.

Problem 1, the SR needs to adapt different label stack formats fordifferent forwarding planes, the label stack formats are not unified,and especially in a scenario where a service end-to-end forwarding pathspans different forwarding planes, a forwarding boundary node needs totranslate the label stack format to adapt to the forwarding plane.

Problem 2, an application of the SR needs to sense a specific forwardingplane technology, different label stack formats are adaptivelyencapsulated for different forwarding planes, and a complexity of theapplication of the SR is increased.

Problem 3, the SR adapts the label stack formats for differentforwarding planes, which is not conducive to the SR technology extendingto a new forwarding plane, i.e., a new SR label stack format needs to bespecially defined for the new forwarding plane.

SUMMARY

A method and a device for processing a packet by using a unified SRlabel stack are provided by embodiments of the preset disclosure tosolve the problem that different label stack encapsulation formats needto be adapted for different forwarding planes when the packet isforwarded by current SR.

In an embodiment of the present disclosure, provided is a method forprocessing a packet by using a unified SR label stack including:allocating, according to a type of a forwarding plane, a compatibilityindicator indicating that a Unified Segment Routing Header (U-SRH) iscarried, for a service packet entering the forwarding plane; adding anSR label stack, the U-SRH and the compatibility indicator to the servicepacket to obtain an extended packet; and processing and forwarding theextended packet in the forwarding plane according to the SR label stack,the U-SRH and the compatibility indicator.

In some implementations, the allocating, according to the type of theforwarding plane, the compatibility indicator indicating that the U-SRHis carried, for the service packet entering the forwarding planeincludes: in response to that the forwarding plane is a Multi-ProtocolLabel Switching (MPLS) or Multi-Protocol Label Switching TransportProtocol (MPLS-TP) forwarding plane, allocating an MPLS or MPLS-TPreserved label indicating that the U-SRH is carried, for the servicepacket as the compatibility indicator; in response to that theforwarding plane is an IPv6 forwarding plane, allocating an IPv6extension header indicating that the U-SRH is carried, for the servicepacket as the compatibility indicator; in response to that theforwarding plane is an IPv4 forwarding plane, allocating a User DataProtocol (UDP) port number indicating that the U-SRH is carried, for theservice packet as the compatibility indicator; and in response to thatthe forwarding plane is any other forwarding plane, allocating anextended header indicating that the U-SRH is carried, for the servicepacket as the compatibility indicator.

In some implementations, the U-SRH includes a parameter indicating aformat of the SR label stack, and the parameter includes at least one ofa header version, a maximum label number and a current label number ofthe label stack, a maximum label depth and a current label depth, aformat width of a SR label, a forwarding plane encapsulation type, andother flags.

In some implementations, the adding the SR label stack, the U-SRH andthe compatibility indicator to the service packet to obtain the extendedpacket includes: pushing the SR label stack and the U-SRH into theservice packet in a stack pushing mode, and pushing the compatibilityindicator before the U-SRH, to obtain the extended packet.

In some implementations, the processing and forwarding the extendedpacket in the forwarding plane according to the SR label stack, theU-SRH and the compatibility indicator includes: in response toidentifying, by parsing the extended packet, that the extended packetcarries the compatibility indicator and the compatibility indicator isidentified as indicating a compatibility forwarding plane, processingand forwarding the extended packet according to the U-SRH and thecompatibility indicator; in response to that no compatibility indicatoris identified as being carried by the extended packet, forwarding theextended packet according to a forwarding flow of the forwarding plane;and in response to that the compatibility indicator is not identified asindicating the compatibility forwarding plane, discarding the extendedpacket.

In some implementations, the method further includes: in response tothat the extended packet is forwarded to an egress of the forwardingplane, popping up the U-SRH, the SR label stack and the compatibilityindicator from the extended packet, and sending the service packet outof the forwarding plane.

In an embodiment of the present disclosure, provided is a device forprocessing a packet by using a unified SR label stack including: anallocating module configured to allocate, according to a type of aforwarding plane, a compatibility indicator indicating that a U-SRH iscarried, for a service packet entering the forwarding plane; a stackpushing module configured to add an SR label stack, the U-SRH and thecompatibility indicator to the service packet to obtain an extendedpacket; and a forwarding module configured to process and forward theextended packet in the forwarding plane according to the SR label stack,the U-SRH and the compatibility indicator.

In another embodiment of the present disclosure, provided is a devicefor processing a packet by using a unified SR label stack including: aprocessor and a memory coupled to the processor, the memory stores aprogram, capable of being executed by the processor, for processing thepacket by using the unified SR label stack, and the program is to beexecuted by the processor to implement following steps: allocating,according to a type of a forwarding plane, a compatibility indicatorindicating that a U-SRH is carried, for a service packet entering theforwarding plane; adding an SR label stack, the U-SRH and thecompatibility indicator to the service packet to obtain an extendedpacket; and processing and forwarding the extended packet in theforwarding plane according to the SR label stack, the U-SRH and thecompatibility indicator.

In an embodiment of the present disclosure, provided is a system forprocessing a packet by using a unified SR label stack including: aningress node configured to allocate, according to a type of a forwardingplane, a compatibility indicator indicating that a U-SRH is carried, fora service packet entering the forwarding plane, and add an SR labelstack, the U-SRH and the compatibility indicator to the service packetto obtain an extended packet; a forwarding node configured to determinewhether the extended packet carries the U-SRH according to thecompatibility indicator carried by the extended packet, and process andforward the extended packet according to the U-SRH and the SR labelstack; and an egress node configured to pop up the U-SRH, the SR labelstack and the compatibility indicator from the extended packet, and sendthe service packet out of the forwarding plane.

In an embodiment of the present disclosure, provided is a storage mediumstoring a program for processing a packet by using a unified SR labelstack, and the program is to be executed by a processor to implementfollowing steps: allocating, according to a type of a forwarding plane,a compatibility indicator indicating that a U-SRH is carried, for aservice packet entering the forwarding plane; adding an SR label stack,the U-SRH and the compatibility indicator to the service packet toobtain an extended packet; and processing and forwarding the extendedpacket in the forwarding plane according to the SR label stack, theU-SRH and the compatibility indicator.

Technical solutions provided by the embodiments of the presentdisclosure have following beneficial effects.

The embodiments of the present disclosure realize the unified SR labelstack in a PTN, and specifically applies the unified SR label stack todifferent forwarding planes, thereby improving uniformity, effectivenessand expansibility of the SR technology, and being suitable for variouspacket forwarding networks including MPLS/MPLS-TP, IPv4/IPv6 and thelike.

DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram illustrating a principle of SR technology;

FIG. 2 is a flowchart for processing a packet by using a unified SRlabel stack according to an embodiment of the present disclosure;

FIG. 3 is a block diagram of a device for processing a packet by using aunified SR label stack according to an embodiment of the presentdisclosure;

FIG. 4 is a schematic diagram illustrating a definition of format of aUnified Segment Routing Header (U-SRH) in an embodiment of the presentdisclosure;

FIG. 5 is a flowchart of processing and forwarding on a forwarding planein an embodiment of the present disclosure;

FIG. 6 is a schematic diagram illustrating a packet format of a unifiedSR label stack in an MPLS/MPLS-TP forwarding plane according to anembodiment of the present disclosure;

FIG. 7 is a schematic diagram illustrating a packet format of a unifiedSR label stack in an IPv6 forwarding plane according to an embodiment ofthe present disclosure; and

FIG. 8 is a schematic diagram illustrating a packet format of a unifiedSR label stack in an IPv4 forwarding plane according to an embodiment ofthe present disclosure.

DESCRIPTION OF EMBODIMENTS

The embodiments of the present disclosure will be described in detailbelow with reference to the accompanying drawings, and it should beunderstood that the embodiments described below are only for a purposeof illustrating and explaining the present disclosure, and are not to beused as limitations of the present disclosure.

Embodiment 1

FIG. 2 is a flowchart of processing a packet by using a unified SR labelstack according to the embodiment of the present disclosure, and asshown in FIG. 2, following steps S101 to S103 are included.

At step S101, allocating, according to a type of a forwarding plane, acompatibility indicator indicating that a Unified Segment Routing Header(U-SRH) is carried, for a service packet entering the forwarding plane.

If the forwarding plane is an MPLS or MPLS-TP forwarding plane, an MPLSor MPLS-TP reserved label indicating that the U-SRH is carried, forexample, with a reserved label value of 8, is allocated for the servicepacket as the compatibility indicator. If the forwarding plane is anIPv6 forwarding plane, an IPv6 extension header, for example, anextension header 45 indicating that the U-SRH is carried, is allocatedfor the service packet as the compatibility indicator. If the forwardingplane is an IPv4 forwarding plane, a UDP port number, such as a UDP portnumber 2000 indicating that the U-SRH is carried, is allocated for theservice packet as the compatibility indicator. If the forwarding planeis any other forwarding plane, for example, a Virtual extensible LocalArea Network (VxLAN) forwarding plane, an extension header indicatingthat the U-SRH is carried, is allocated for the service packet as thecompatibility indicator, and the extension header may be a newly definedextension header or a newly defined routing extension header based onthe SRH.

At step S102, adding an SR label stack, the U-SRH and the compatibilityindicator to the service packet to obtain an extended packet.

The SR label stack and the U-SRH are pushed into the service packet in astack pushing mode, and then the compatibility indicator is pushedbefore the U-SRH, to obtain the extended packet.

At step S103, processing and forwarding the extended packet in theforwarding plane according to the SR label stack, the U-SRH and thecompatibility indicator.

If it is identified that the extended packet carries the compatibilityindicator by parsing the extended packet, and the compatibilityindicator is identified as indicating a compatibility forwarding plane,the extended packet is processed and forwarded according to the U-SRHand the compatibility indicator, and if the compatibility indicator isnot identified as indicating the compatibility forwarding plane, theextended packet is discarded.

It should be noted that, if no compatibility indicator is identified asbeing carried by the extended packet, the extended packet is forwardedaccording to a forwarding flow of the forwarding plane.

The U-SRH contains a parameter for indicating a format of the SR labelstack, and the parameter includes at least one of a header version, amaximum label number and a current label number of the label stack, amaximum label depth and a current label depth, a format width of a SRlabel, a forwarding plane encapsulation type, and other flags. The otherflags may include information such as an Operation Administration andMaintenance (OAM) packet indication.

Further, when the extended packet is forwarded to an egress of theforwarding plane, the U-SRH, the SR label stack, and the compatibilityindicator are popped up from the extended packet, and the service packetis sent out of the forwarding plane.

It will be understood by those skilled in the art that all or a part ofsteps in the method according to the above embodiments may beimplemented by a program instructing a related hardware, and the programmay be stored in a computer-readable storage medium. An embodiment ofthe present disclosure may provide a storage medium, which stores aprogram for processing a packet by using a unified SR label stack, andthe program is to be executed by a processor to implement followingsteps: allocating, according to a type of a forwarding plane, acompatibility indicator indicating that a U-SRH is carried, for aservice packet entering the forwarding plane; adding an SR label stack,the U-SRH and the compatibility indicator to the service packet toobtain an extended packet; and processing and forwarding the extendedpacket in the forwarding plane according to the SR label stack, theU-SRH and the compatibility indicator. The storage medium may includeROM/RAM, magnetic disk, optical disk and U disk.

Embodiment 2

FIG. 3 is a block diagram of a device for processing a packet by using aunified SR label stack according to an embodiment of the presentdisclosure, and as shown in FIG. 3, the device includes: an allocatingmodule configured to allocate, according to a type of a forwardingplane, a compatibility indicator indicating that a U-SRH is carried, fora service packet entering the forwarding plane; a stack pushing moduleconfigured to add an SR label stack, the U-SRH and the compatibilityindicator to the service packet to obtain an extended packet; and aforwarding module, configured to process and forward the extended packetin the forwarding plane according to the SR label stack, the U-SRH andthe compatibility indicator.

The device may be arranged at an ingress node of the forwarding plane,and a work flow of the device is as follows: if the forwarding plane isan MPLS or MPLS-TP forwarding plane, the allocating module allocates anMPLS or MPLS-TP reserved label indicating that the U-SRH is carried, forexample, with a reserved label value of 8, for the service packet, asthe compatibility indicator; if the forwarding plane is an IPv6forwarding plane, the allocating module allocates an IPv6 extensionheader, for example, an extension header 45 indicating that the U-SRH iscarried, for the service packet, as the compatibility indicator; if theforwarding plane is an IPv4 forwarding plane, the allocating moduleallocates a UDP port number, such as a UDP port number 2000 indicatingthat the U-SRH is carried, for the service packet, as the compatibilityindicator; if the forwarding plane is any other forwarding plane, suchas a VxLAN forwarding plane, the allocating module allocates anextension header indicating that the U-SRH is carried, for the servicepacket, as the compatibility indicator. The stack pushing module pushesthe SR label stack and the U-SRH into the service packet in a stackpushing mode, and then pushes the compatibility indicator before theU-SRH, to obtain the extended packet. The forwarding module processesand forwards the extended packet according to the U-SRH and thecompatibility indicator.

The forwarding module may be arranged at a forwarding node and an egressnode, and when the forwarding node receives a packet, the forwardingmodule parses the extended packet, and in response to identifying thatthe extended packet carries the compatibility indicator and thecompatibility indicator is identified as indicating a compatibilityforwarding plane, processes and forwards the extended packet, and inresponse to identifying that the extended packet carries thecompatibility indicator while the compatibility indicator is notidentified as indicating the compatibility forwarding plane, discardsthe extension packet. When the egress node receives the extended packet,the U-SRH, the SR label stack and the compatibility indicator are poppedup from the extended packet, and the service packet is sent out of theforwarding plane.

Embodiment 3

The present embodiment provides a device for processing a packet byusing a unified SR label stack, which includes: a processor and a memorycoupled to the processor, the memory stores a program, capable of beingexecuted by the processor, for processing a packet by using a unified SRlabel stack, and the program is to be executed by the processor toimplement following steps: allocating, according to a type of aforwarding plane, a compatibility indicator indicating that a U-SRH iscarried, for a service packet entering the forwarding plane; adding anSR label stack, the U-SRH and the compatibility indicator to the servicepacket to obtain an extended packet; and processing and forwarding theextended packet in the forwarding plane according to the SR label stack,the U-SRH and the compatibility indicator.

Embodiment 4

The present embodiment provides a system for processing a packet byusing a unified SR label stack, which includes: an ingress nodeconfigured to allocate, according to a type of a forwarding plane, acompatibility indicator indicating that a U-SRH is carried, for aservice packet entering the forwarding plane, and add an SR label stack,the U-SRH and the compatibility indicator to the service packet toobtain an extended packet; a forwarding node configured to determinewhether the extended packet carries the U-SRH according to thecompatibility indicator carried by the extended packet, and process andforward the extended packet according to the U-SRH and the SR labelstack; and an egress node configured to pop up the U-SRH, the SR labelstack and the compatibility indicator from the extended packet, and sendthe service packet out of the forwarding plane.

A working process of the system is as follows: after receiving theservice packet, the egress node pushes an SR label stack and the U-SRHinto the service packet, and pushes the compatibility indicatorallocated for the service packet before the U-SRH to obtain the extendedpacket, so as to process and forward the packet. After the forwardingnode receives the extended packet, in response to identifying that theextended packet carries the compatibility indicator and thecompatibility indicator is identified as indicating a compatibilityforwarding plane, the extended packet is processed and forwarded. Theegress node pops up the U-SRH, the SR label stack and the compatibilityindicator from the extended packet and sends the service packet out ofthe forwarding plane.

Embodiment 5

The embodiments of the present disclosure realize a unified SR labelstack format in a packet transport network, do not need the SR to adaptdifferent label stacks for different forwarding planes, and the unifiedSR label stack can adapt to different forwarding planes. That is to say,the embodiments of the present disclosure design a unified SR labelstack format, and with the unified SR label stack format, it is notnecessary to adapt different label stacks for different forwardingplanes, and the unified SR label stack is applied to differentforwarding planes.

FIG. 4 is a schematic diagram illustrating a definition of format of aU-SRH in an embodiment of the present disclosure. As shown in FIG. 4, aUnified Segment Routing Header (U-SRH) is added, where relevantparameters of the SR label stack format, such as version number(Version, Ver or V) of the label stack, maximum label number (Max LabelNum, MLN or M) of the label stack, current label number (Current LabelNum, CLN or C) of the label stack, encapsulation type (Label Type, LT)of a label, and other flags (Flags, F) are defined in the SR header, andwith the U-SRH, it is convenient to realize the unified SR label stackwithout perceiving technologies of different forwarding planes.

An algorithm provided by the embodiments of the present disclosureincludes following steps 1 and 2.

Step 1, defining a U-SRH, where the header contains a parameterindicating a format of SR label stack, and a unified SR label stackformat is shown in FIG. 4.

Step 2, defining a compatibility indicator of the U-SRH, which iscompatible with an existing forwarding plane. For an MPLS/MPLS-TPforwarding plane, an MPLS reserved label value (e.g., a reserved valueof 8 is suggested for the MPLS/MPLS-TP forwarding plane identifying anindicator indicating whether an SR label stack is carried or not) may beused, but is not limited, for an extension indication of the U-SRH. Foran IPv6 forwarding plane, a new Extension Header Type may be defined ora new routing extension header type may be defined based on the SRH forindicating whether the SR label stack is carried or not. For any otherforwarding plane such as VxLAN, a U-SRH indicator may be defined bysimilar considerations.

The U-SRH in the step 1 may include, but is not limited to, a version(Ver, such as 2 bits) parameter indicating a version of the header andsupports subsequent update and extension of the U-SRH.

The U-SRH in the step 1 may include, but is not limited to, a LabelDepth (LD, such as 6 bits) parameter, including a required Maximum LabelDepth (MLD) and a Current Label Depth (CLD), so as to facilitate theforwarding plane processing the label stack.

The U-SRH in the step 1 may include, but is not limited to, a formatwidth (W, such as 2 bits) parameter of a SR label, indicating a bitwidth (e.g., 0:32 bits/1:128 bits) of the label.

The U-SRH in the step 1 may include, but is not limited to, anencapsulation type (LT, such as 3 bits) parameter of the forwardingplane, indicating an encapsulation protocol format of the label, aflexible label encapsulation type is supported, and an MPLS label type(e.g., 0:MPLS/1:IPv6, and others to be allocated) is suggested bydefault.

The U-SRH in the step 1 may include, but is not limited to, other flag(Flags) information parameters, including OAM packet indicationinformation (O-Flag: OAM packet indication), indication information ofthe next U-SRH (N-Flag: the next U-SRH) being carried, user-definedinformation (U-Flag: user-defined information) being carried.

For the compatibility indicator of the U-SRH, the forwarding plane inthe step 2 indicates whether the U-SRH is carried, by defining acompatibility indicator compatible with the forwarding plane, and aselection of the compatibility indicator satisfies following tworequirements: on one hand, the compatibility indicator needs to becompatible with the corresponding forwarding plane, i.e., an originalforwarding flow is performed for the forwarding plane which does notperceive the U-SRH; on the other hand, the packet is to be discarded bydefault for the forwarding plane which perceives the compatibilityindicator but cannot identify the indicator, so that error forwarding isavoided. For example, a reserved label value is selected forMPLS/MPLS-TP as the compatibility indicator.

After identifying the U-SRH compatibility indicator, the forwardingplane in the step 2 performs forwarding processing according to theforwarding flow of the U-SRH, including but not limited to completingforwarding processing related to the SR label stack, where theprocessing flow of the forwarding plane is shown in FIG. 5, and theprocessing flow of each forwarding plane is described in detail belowwith reference to FIGS. 6 to 8.

Embodiment 6

A Unified Segment Routing Label Stack being Applied to an MPLS/MPLS-TPForwarding Plane.

For the MPLS/MPLS-TP forwarding plane, the existing label format cannotdistinguish SR label from ordinary MPLS/MPLS-TP label, i.e., whether anSR label stack is carried or not cannot be identified by the labelitself unless configured or specified by a management control plane.

With the method of the embodiment of the present disclosure, a reservedlabel of MPLS/MPLS-TP (for example, a reservation label value of 8) isfirst allocated to indicate whether the U-SRH is carried, appropriateparameters are configured, and then an SR label stack is added, as shownin FIG. 6.

The processing of the MPLS/MPLS-TP forwarding plane is as follows.

1. the PE ingress node completes stack pushing of the U-SRH and the SRlabel stack and adds an SR compatibility indicator of MPLS/MPLS-TP,i.e., a reserved label 8 is pushed before the U-SRH.

2. the pure P node does not perceive the U-SRH and the SR label stackand only performs forwarding according to the original forwarding flowof MPLS/MPLS-TP.

3. the node which perceives the U-SRH, i.e., identifies the label 8(U-SRH compatibility indicator), and supports the U-SRH performscorresponding processing of SR forwarding flow. Meanwhile, an extensionprocessing (such as OAM) can be performed through identifying a flag ofthe U-SRH and the subsequent SR label.

4. the node which perceives the U-SRH but does not support the U-SRH,i.e., the node which identifies the label 8 but does not supportprocessing of the label, discards the packet.

5. the PE egress node finishes popping the U-SRH and the SR label stackup, and recovers a payload.

Embodiment 7

A Unified Segment Routing Label Stack being Applied to an IPv6Forwarding Plane.

For the IPv6 forwarding plane, the existing label format cannotdistinguish SR label from ordinary IPv6 address, i.e., whether an SRlabel stack is carried or not cannot be identified by the header itselfunless configured or specified by a management control plane.

By the method of the embodiment of the present disclosure, first, anextension header of IPv6 (for example, an extension header 45 isallocated for SR extension) is allocated to indicate whether the U-SRHis carried, appropriate parameters are configured, and then an SR labelstack is added, as shown in FIG. 7. In particular, for an IPv6 addresslong format (128 bits), a flag may be used in the U-SRH to indicate alabel address format used by the SR label stack, such as a 32 bit label,with a short format, being compatible with MPLS label may be used,thereby reducing a length of the header.

The processing of the IPv6 forwarding plane is as follows.

1. the PE ingress node completes stack pushing of the U-SRH and the SRlabel stack, and adds an SR compatibility indicator of IPv6, i.e., addsan IPv6 extension header before the U-SRH, and according to convention,indicates that the IPv6 extension header is compatible with SR extensionheader.

2. the pure P node does not perceive the U-SRH and the SR label stackand only performs forwarding according to the original forwarding flowof IPv6.

3. the node which perceives the U-SRH, i.e., identifies an extensionheader (U-SRH compatibility indicator) containing the U-SRH, andsupports the U-SRH performs corresponding processing of SR forwardingflow. Meanwhile, an extension processing (such as OAM) can be performedthrough identifying a flag of the U-SRH and the subsequent SR label.

4. the node which perceives the U-SRH but does not support the U-SRH,i.e., the node which identifies the extension header but does notsupport processing of the label, discards the packet.

5. the PE egress node finishes popping the U-SRH and the SR label stackup, and recovers a payload.

Embodiment 8

A Unified Segment Routing Label Stack being Applied to an IPv4Forwarding Plane.

For the IPv4 forwarding plane, the existing IPv4 header cannotdistinguish whether the SR label stack is carried or not, i.e., whetheran SR label stack is carried or not cannot be identified by the headeritself unless configured or specified by a management control plane.

By the method of the embodiment of the present disclosure, first, an SRcompatibility indicator (for example, using a designated UDP port number2000) of the IPv4 forwarding plane is allocated to indicate whether theU-SRH is carried, appropriate parameters are configured, and then an SRlabel stack is added, as shown in FIG. 8.

The processing of the IPv4 forwarding plane is as follows.

1, the PE ingress node completes stack pushing of the U-SRH and the SRlabel stack and adds an SR compatibility indicator of IPv4, i.e., adds aUDP encapsulation before the U-SRH and uses the compatibility indicator(the designated UDP port number, for example, 2000) according toconvention.

2. The pure P node does not perceive the U-SRH and the SR label stackand only performs forwarding according to the original forwarding flowof IPv4.

3. the node which perceives the U-SRH, i.e., identifies an extensionheader (U-SRH compatibility indicator) containing the U-SRH, andsupports the U-SRH performs corresponding processing of SR forwardingflow. Meanwhile, an extension processing (such as OAM) can be performedby identifying a flag of the U-SRH and the subsequent SR label.

4. the node which perceives the U-SRH but does not support the U-SRH,i.e., the node which identifies the extension header but does notsupport processing of the label, discards the packet.

5. the PE egress node finishes popping the U-SRH and the SR label stackup, and recovers a payload.

Example 9

A unified Segment Routing label stack being applied to a hybridforwarding plane.

For a forwarding plane with MPLS/MPLS-TP and IPv6 hybrid networking,there are two scenarios.

1. the service sequentially passes through different forwarding planes,and no intersection node exists between the different forwarding planes,i.e., no node simultaneously belongs to two forwarding domains.

2. if there is an intersection node between the different forwardingplanes, then an Edge Node of a mixed forwarding plane is introduced, andthe Edge Node can realize intercommunication between the differentforwarding planes.

For the former scenario, the forwarding planes within the MPLS/MPLS-TPand IPv6 forwarding domains are respectively the same as those inEmbodiment 6 and Embodiment 7, and there is no difference.

For the latter scenario, the Edge Node needs to simultaneously completefunctions of the PE node for SR in two forwarding planes, and whenentering the IPv6 forwarding domain from the MPLS/MPLS-TP forwardingdomain, the function of the PE egress node of the MPLS/MPLS-TPforwarding plane is completed first, and then the function of the PEingress node of the IPv6 forwarding plane is completed.

According to the embodiments of the present disclosure, by realizing theunified SR label stack, the application of the SR technology indifferent forwarding planes is simplified, and uniformity of the SRencapsulation format is enhanced.

To sum up, the embodiments of the present disclosure have followingtechnical effects.

By using the U-SRH, the embodiments of the present disclosure canconveniently realize the unified SR label stack without perceivingtechnologies of different forwarding planes, reduces complexity ofapplication of the SR, and improves expandability of the SR technology.

Although the present disclosure has been described in detail above, thepresent disclosure is not limited thereto, and various modifications canbe made by those skilled in the art in light of principles of thepresent disclosure. Accordingly, any modification made in accordancewith the principles of the present disclosure should be understood tofall within the scope of the present disclosure.

The invention claimed is:
 1. A method for processing a packet by using a unified segment routing (SR) label stack, comprising: allocating, according to a type of a forwarding plane, a compatibility indicator indicating that a unified segment routing header (U-SRH) is carried, for a service packet entering the forwarding plane; adding an SR label stack, the U-SRH and the compatibility indicator to the service packet to obtain an extended packet; processing and forwarding the extended packet in the forwarding plane according to the SR label stack, the U-SRH and the compatibility indicator; and in response to that the extended packet is forwarded to an egress of the forwarding plane, popping up the U-SRH, the SR label stack and the compatibility indicator from the extended packet, and sending the service packet out of the forwarding plane.
 2. The method according to claim 1, wherein the allocating, according to the type of the forwarding plane, the compatibility indicator indicating that the U-SRH is carried, for the service packet entering the forwarding plane comprises: in response to that the forwarding plane is a multiprotocol label switching (MPLS) or multiprotocol label switching transport protocol (MPLS-TP) forwarding plane, allocating an MPLS or MPLS-TP reserved label indicating that the U-SRH is carried, for the service packet as the compatibility indicator; in response to that the forwarding plane is an IPv6 forwarding plane, allocating an IPv6 extension header indicating that the U-SRH is carried, for the service packet as the compatibility indicator; in response to that the forwarding plane is an IPv4 forwarding plane, allocating a user datagram protocol (UDP) port number indicating that the U-SRH is carried, for the service packet as the compatibility indicator; and in response to that the forwarding plane is any other forwarding plane, allocating an extension header indicating that the U-SRH is carried, for the service packet as the compatibility indicator.
 3. The method according to claim 1, wherein the U-SRH contains a parameter indicating a format of the SR label stack, and the parameter includes at least one of a header version, a maximum label number and a current label number of the label stack, a maximum label depth and a current label depth, a format width of a SR label, a forwarding plane encapsulation type, other flags.
 4. The method according to claim 1, wherein the adding the SR label stack, the U-SRH and the compatibility indicator to the service packet to obtain the extended packet comprises: pushing the SR label stack and the U-SRH into the service packet in a stack pushing mode, and pushing the compatibility indicator before the U-SRH to obtain the extended packet.
 5. The method according to claim 1, wherein the processing and forwarding the extended packet in the forwarding plane according to the SR label stack, the U-SRH and the compatibility indicator comprises: in response to identifying that the extended packet carries the compatibility indicator and the compatibility indicator is identified as indicating a compatibility forwarding plane by parsing the extended packet, processing and forwarding the extended packet according to the U-SRH and the compatibility indicator; in response to that the extended packet is not identified as carrying the compatibility indicator, forwarding the extended packet according to a forwarding flow of the forwarding plane; and in response to that the compatibility indicator is not identified as indicating the compatibility forwarding plane, discarding the extended packet.
 6. A device for processing a packet by using a unified segment routing (SR) label stack, comprising: an allocating module configured to allocate, according to a type of a forwarding plane, a compatibility indicator indicating that a unified segment routing header (U-SRH) is carried, for a service packet entering the forwarding plane; a stack pushing module configured to add an SR label stack, the U-SRH and the compatibility indicator to the service packet to obtain an extended packet; and a forwarding module configured to process and forward the extended packet in the forwarding plane according to the SR label stack, the U-SRH and the compatibility indicator, and in response to that the extended packet is forwarded to an egress of the forwarding plane, pop up the U-SRH, the SR label stack and the compatibility indicator from the extended packet, and send the service packet out of the forwarding plane.
 7. A device for processing a packet by using a unified segment routing (SR) label stack, comprising: a processor and a memory coupled to the processor, the memory stores a program, capable of being executed by the processor, for processing the packet by using the unified SR label stack, and the program is to be executed by the processor to implement the method according to claim
 1. 8. A system for processing a packet by using a unified segment routing (SR) label stack, comprising: an ingress node configured to allocate, according to a type of a forwarding plane, a compatibility indicator indicating that a unified segment routing header (U-SRH) is carried, for a service packet entering the forwarding plane, and add an SR label stack, the U-SRH and the compatibility indicator to the service packet to obtain an extended packet; a forwarding node configured to determine that the extended packet carries the U-SRH according to the compatibility indicator carried by the extended packet, and process and forward the extended packet according to the U-SRH and the SR label stack; and an egress node configured to pop up the U-SRH, the SR label stack and the compatibility indicator from the extended packet, and send the service packet out of the forwarding plane.
 9. A non-transitory computer readable medium, in which a program for processing a packet by using a unified segment routing (SR) label stack is stored, wherein the program is to be executed by a processor to implement the method according to claim
 1. 10. A method for processing a packet by using a unified segment routing (SR) label stack, comprising: allocating, according to a type of a forwarding plane, a compatibility indicator indicating that a unified segment routing header (U-SRH) is carried, for a service packet entering the forwarding plane; adding an SR label stack, the U-SRH and the compatibility indicator to the service packet to obtain an extended packet; processing and forwarding the extended packet in the forwarding plane according to the SR label stack, the U-SRH and the compatibility indicator, wherein the processing and forwarding the extended packet in the forwarding plane according to the SR label stack, the U-SRH and the compatibility indicator comprises: in response to identifying that the extended packet carries the compatibility indicator and the compatibility indicator is identified as indicating a compatibility forwarding plane by parsing the extended packet, processing and forwarding the extended packet according to the U-SRH and the compatibility indicator; in response to that the extended packet is not identified as carrying the compatibility indicator, forwarding the extended packet according to a forwarding flow of the forwarding plane; and in response to that the compatibility indicator is not identified as indicating the compatibility forwarding plane, discarding the extended packet. 